#include "EZ_Thread.h"

ez_thread_t idle_task;
uint32_t 		idle_env[1024];     
void (*idel_callback)(void *);


void set_idle_callback(void (*callback)(void *))
{
	idel_callback = callback;
}

void idle_entry(void * param) 
{
		while(1)
		{
			if(idel_callback != EZ_NULL)
			{
				idel_callback((void *)0);
			}
		}
}

void idel_init(void)
{
	task_init(&idle_task,idle_entry,(void *)0x11111111,&idle_env[1024],31,1);
	task_startup(&idle_task);
}
